<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page trimDirectiveWhitespaces="true" %>
<%@include file="/admin/include/includeAdminTaglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <t:base type="jquery,easyui1.5"></t:base>
    <style>
        * {
            font-size: 12px;
        }
    </style>
</head>
<body>
<form method="post" id="formObj" name="formObj" autocomplete="off">
    <input type="hidden" name="itemId" value="${assessmentItemModel.itemId}"/>
    <input type="hidden" name="dataId" value="${empty param.dataId ?  assessmentItemModel.dataId : param.dataId}"/>
    <input type="hidden" name="formId" value="${empty param.formId ?  assessmentItemModel.formId : param.formId}"/>
    <input type="hidden" name="createUserId" value="${assessmentItemModel.createUserId}"/>
    <input type="hidden" name="createDate" value="<fmt:formatDate value="${assessmentItemModel.createDate}" pattern="yyyy-MM-dd HH:mm:ss" />"/>
    <table cellpadding="5" width="100%">
        <tr>
            <td align="right">资料项名称:</td>
            <td >
                <input class="easyui-textbox" type="text" name="itemName"  data-options="required:true" value="${assessmentItemModel.itemName}"/>
            </td>
        </tr>
        <tr>
            <td align="right">排序:</td>
            <td >
                <input class="easyui-textbox" type="text" name="pos"  data-options="required:true" value="${assessmentItemModel.pos}"/>
            </td>
        </tr>
    </table>
    <table cellpadding="5" width="100%">
    </table>
</form>
<script>
    $("#formObj").form({
        url: '${frontPath}/admin/assessment/itemsave',
        onSubmit: function () {
            var flag = $(this).form('validate');
            return flag;
        },
        success: function (resultObj) {
            var tip="成功"
            resultObj=$.parseJSON(resultObj)
            if(!resultObj.success){
                tip="失败"
            }
            top.showMessage("${empty assessmentItemModel.itemId ? '添加' : '修改'}资料项"+tip)
            $dialog.window("close")
            top.reloadContentGird();
        }
    })
    function submitForm(){
        $("#formObj").submit()
    }
</script>
</body>
</html>